<notempty name="comments">
<div class="comments">
    <ul>
        <volist name="comments" id="vo">
        <li id="comment-{$vo.comment_id}" class="item">
            <div class="profile">
                <a href="{$vo.poster_id|format_user_url=$vo['poster_name']}"><img class="avatar" src="{$vo.email|get_avatar}"/></a>
            </div>
            <div class="qa-container">
                <div class="content">{$vo.details|parse_markup}</div>
                <ul class="meta">
                    <li>{$Think.lang.commented_by} <a href="{$vo.poster_id|format_user_url=$vo['poster_name']}">{$vo.poster_name}</a></li>
                    <li> - <abbr title="{$vo.create_time|format_date}">{$vo.create_time|pretty_date}</abbr></li>
                    <if condition="($perms['allow_edit_comment'] AND $_user['user_id'] eq $vo['poster_id']) OR $perms['admin_edit_comment']">
                    <li> - <a href="javascript:void(0)" onclick="editCommentDialog('{$vo.comment_id}')">{$Think.lang.edit}</a></li>
                    </if>
                    <if condition="($perms['allow_delete_comment'] AND $_user['user_id'] eq $vo['poster_id']) OR $perms['admin_delete_comment']">
                    <li> - <a href="javascript:delCommentDialog('{$vo.comment_id}')">{$Think.lang.delete}</a></li>
                    </if>
                    <if condition="($perms['allow_report'] AND $_user['user_id'] neq $vo['poster_id'])">
                    <li class="report-abuse"><a href="javascript:void(0)" onclick="reportDialog('{$vo.comment_id}','C')">{$Think.lang.report_abuse}</a></li>
                    </if>
                </ul>
            </div>
        </li>
        </volist>
    </ul>
    <eq name="perms.allow_comment" value="1">
    <p><input class="btn fr" type="button" value="{$Think.lang.add_comment}" onclick="addCommentDialog('{$id}', '{$type}')" /></p>
    </eq>
</div>
<else/>
<div class="comments">
    <p class="no-comments">{$Think.lang.no_comments}</p>    
    <eq name="perms.allow_comment" value="1">
    <p><input class="btn fr" type="button" value="{$Think.lang.add_comment}" onclick="addCommentDialog('{$id}', '{$type}')" /></p>
    </eq>
</div>
</notempty>
